ioemu: Support more Capability Structures (including MSI/MSI-X)
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 4 Jul 2008 10:54:21 +0000 (11:54 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 4 Jul 2008 10:54:21 +0000 (11:54 +0100)
commit5552b9af817acd2253a2423e04b147e0d26d751d
tree5fcda98ea6112c3d8b086a0bf8231c82ea8c638c
parent2521c9ab943a0e419d8bb9040ef787068776f4c3
ioemu: Support more Capability Structures (including MSI/MSI-X)
       and Device Specific Registers for pt device.

I implemented following Capability Structures and Device Specific
Registers.
    * Configuration Header Type 0
        -> emulation.
           "emulation" does not mean no accessing real I/O device.
           Access real I/O device, but guest value and real value
           might be different.
    * MSI Capability Structure
        -> emulation.
           Behavior is not changed from existed implementation in
           pt-msi.c, although code is changed.
    * MSI-X Capability Structure
        -> emulation.
           Behavior is not changed from existed implementation in
           pt-msi.c, although code is changed.
    * PCI Express Capability Structure
        -> emulation.
    * PCI Power Management Capability Structure
        -> emulation.
    * Vital Product Data Capability Structure
        -> emulation.
           Emulated register is only  Next Capability Pointer
    Register.
           All other registers are passthrough.
    * Vendor Specific Capability Structure
        -> emulation
           Emulated register is only  Next Capability Pointer
    Register.
           All other registers are passthrough.
    * Device Specific Register (exclude capability structures)
        -> passthrough.
           The device drivers in guest domain are allowed to access
           Device Specific Register. So various I/O device will work.

I assigned following device to guest domain, and they worked fine.
    - PCIe NIC (MSI)
    - PCI NIC (MSI)
    - UHCI (INTx interrupt)
    - IDE Controller (INTx interrupt)

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
tools/ioemu/hw/pass-through.c
tools/ioemu/hw/pass-through.h
tools/ioemu/hw/pci.c
tools/ioemu/hw/pt-msi.c
tools/ioemu/hw/pt-msi.h
tools/ioemu/vl.h